Skip to content

Fix InputDateInteractsWithEditContext_NonNullableDateTime and InputDateInteractsWithEditContext_NullableDateTimeOffset - #68107

Merged
ilonatommy merged 1 commit into
mainfrom
fix-31734
Jul 30, 2026
Merged

Fix InputDateInteractsWithEditContext_NonNullableDateTime and InputDateInteractsWithEditContext_NullableDateTimeOffset#68107
ilonatommy merged 1 commit into
mainfrom
fix-31734

Conversation

@ilonatommy

@ilonatommy ilonatommy commented Jul 30, 2026

Copy link
Copy Markdown
Member

Contributes to #31734 and #67243.

See: #31734 (comment)

Locally both tests fail deterministically on both main and previous releases. This fix adds caret positioning so that at least local runs pass. I don't have hard evidence it will fix the CI version but it's worth a try.

@ilonatommy ilonatommy added this to the 11.0-rc1 milestone Jul 30, 2026
@ilonatommy
ilonatommy requested a review from oroztocil July 30, 2026 10:06
@ilonatommy ilonatommy self-assigned this Jul 30, 2026
Copilot AI review requested due to automatic review settings July 30, 2026 10:06
@ilonatommy
ilonatommy requested a review from a team as a code owner July 30, 2026 10:06
@ilonatommy ilonatommy added the area-blazor Includes: Blazor, Razor Components label Jul 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates two flaky WebAssembly-only Blazor E2E tests that drive native <input type="date"> controls via Selenium. It introduces small helper methods to consistently position the caret before typing and to clear the input, aiming to reduce dropped/reordered keystrokes that previously led to modified invalid vs modified valid mismatches.

Changes:

  • Replaced ad-hoc SendKeys sequences in two tests with SetDate(...) to click, move the caret left, and then type.
  • Replaced repeated backspace/tab clearing sequences with ClearDate(...) to click, select-all, delete, and tab out.
  • Added SetDate/ClearDate private helpers to centralize and standardize date-input interactions.

@ilonatommy
ilonatommy enabled auto-merge (squash) July 30, 2026 12:09
@ilonatommy

Copy link
Copy Markdown
Member Author

/backport to release/9.0

@ilonatommy

Copy link
Copy Markdown
Member Author

/backport to release/8.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0 (link to workflow run)

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/8.0 (link to workflow run)

@github-actions

Copy link
Copy Markdown
Contributor

@ilonatommy backporting to release/9.0 was not run because the source pull request has not been merged. Please merge this pull request before requesting a backport.

@github-actions

Copy link
Copy Markdown
Contributor

@ilonatommy backporting to release/8.0 was not run because the source pull request has not been merged. Please merge this pull request before requesting a backport.

@Youssef1313 Youssef1313 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as long as it's green :)

@ilonatommy
ilonatommy merged commit 4cc739b into main Jul 30, 2026
36 checks passed
@ilonatommy
ilonatommy deleted the fix-31734 branch July 30, 2026 14:23
@ilonatommy

Copy link
Copy Markdown
Member Author

/backport to release/9.0

@ilonatommy

Copy link
Copy Markdown
Member Author

/backport to release/8.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/9.0 (link to workflow run)

@github-actions

Copy link
Copy Markdown
Contributor

@ilonatommy backporting to release/9.0 failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Position the caret explicitly.
Using index info to reconstruct a base tree...
M	src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
CONFLICT (content): Merge conflict in src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Position the caret explicitly.
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/8.0 (link to workflow run)

@github-actions

Copy link
Copy Markdown
Contributor

@ilonatommy backporting to release/8.0 failed, the patch most likely resulted in conflicts. Please backport manually!

git am output
$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Position the caret explicitly.
Using index info to reconstruct a base tree...
M	src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
CONFLICT (content): Merge conflict in src/Components/test/E2ETest/Tests/FormsInputDateTest.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Position the caret explicitly.
Error: The process '/usr/bin/git' failed with exit code 128

Link to workflow output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-blazor Includes: Blazor, Razor Components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants